<!-- /* Description for file.
 * 资源预订-查看
 *
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    /ues/app/views/
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    张海杰2011年0715
 * @lastmodified  张海杰2011年0715
 */-->
<?php
echo $html->css ( 'tab' );
?>
<script type="text/javascript">
$(function() {
	$("#ResourcebookUser").hide();
	var user=$("#ResourcebookUser option:selected").text();
	$("#username").html(user);
	//alert($("#username").val());
	
});
</script>
<?php echo $form->create('Resourcebook',array('action'=>'view','type'=>'post'));?>
<div class="view">
 <fieldset> 
 	<legend><?php __('Resourcebooks');?></legend>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Creater'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $resourcebook['Resourcebook']['creater']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $resourcebook['Resourcebook']['created']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Title'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $resourcebook['Resourcebook']['title']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('ResourceSelect'); ?>：</dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $resourcebook['Resource']['resourceName']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('StartUseTime'); ?>：</dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $resourcebook['Resourcebook']['startTime']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('EndUseTime'); ?>：</dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $resourcebook['Resourcebook']['endTime']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('ResourcebooksUser'); ?>：</dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
					<?php $options2 = array();
								foreach($users as $eachrecord)
								{					
									$options2[$eachrecord['User']['id']] = $eachrecord['User']['username'];
								}
								echo $form->input('user',array('options'=>$options2,'readOnly'=>true,'label'=>false,'div'=>false,'default' => $resourcebook['Resourcebook']['user']));					
					//使用者选择下拉菜单?>	
			<span id="username"></span>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('ResourcebooksUseage'); ?>：</dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $resourcebook['Resourcebook']['useage']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Status'); ?>:</dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $resourcebook['Resourcebook']['status']; ?>
			&nbsp;
		</dd>
	</dl>
</fieldset>
</div>
<?php echo $form->end();?>
<div class="actions" id="notices-actions">
	<ul>
		<li><?php echo $html->link(__('Edit', true), array('action' => 'edit', $resourcebook['Resourcebook']['id']),array('class'=>'editsubmit')); ?> </li>
		<li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $resourcebook['Resourcebook']['id']), array('class'=>'deletebutton'), sprintf(__('确定删除 # %s?', true), $resourcebook['Resourcebook']['title'])); ?> </li>
		<li><?php echo $html->link(__('List', true), array('action' => 'allinfo'),array('class'=>'listbutton')); ?> </li>
		<li><?php echo $html->link(__('Add', true), array('action' => 'add'),array('class'=>'newsubmit')); ?> </li>
	</ul>
</div>
